﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Shell.xaml.cs" company="R.V.Kasner">
//   Copyright © 2011 R.V.Kasner
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace Owen.Terminal
{
    using System.Windows;

    public partial class Shell
    {
        private GridLength oldGoserRowHiegth;

        public Shell()
        {
            this.InitializeComponent();

            this.WindowState = Properties.Settings.Default.ShellWindowState;

            this.Closed += (s, e) => Properties.Settings.Default.ShellWindowState = this.WindowState;
        }

        public void OnGaserExpanderChange(bool isExpand)
        {
            if (isExpand)
            {
                this.GazerRow.Height = this.oldGoserRowHiegth;
            }
            else
            {
                this.oldGoserRowHiegth = this.GazerRow.Height;
                this.GazerRow.Height = GridLength.Auto;
            }
        }
    }
}